Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treat bindless images handle types as native handles #1829

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

callumfare
Copy link
Contributor

The bindless image extension added new handle types, however some of them are used in the SYCL Runtime in ways that contradict how handles are expected to be implemented, by casting them directly between other types. This breaks when UR is used with the UR loader, which transparently wraps handles to allow dispatching to specific adapters. This usage implies they are more like native handles, so they should be implemented like native handles.

Rename the image and image_mem types - if they end in native_handle_t, they are treated as native handles. Also update ImageGetInfoExp to take a context handle so it still possible for the loader to dispatch to the adapters.

Also fix incorrect return condition for UR_RESULT_ERROR_INVALID_IMAGE_FORMAT_DESCRIPTOR in bindless image functions

@github-actions github-actions bot added loader Loader related feature/bug images UR images specification Changes or additions to the specification experimental Experimental feature additions/changes/specification level-zero L0 adapter specific issues cuda CUDA adapter specific issues hip HIP adapter specific issues native-cpu Native CPU adapter specific issues labels Jul 8, 2024
@callumfare callumfare force-pushed the callum/bindless_workaround branch 2 times, most recently from 6d31e76 to 6a8ad56 Compare July 10, 2024 09:41
@callumfare callumfare marked this pull request as ready for review July 10, 2024 09:42
@callumfare callumfare requested review from a team as code owners July 10, 2024 09:42
@callumfare
Copy link
Contributor Author

intel/llvm PR - intel/llvm#14516

@kbenzie kbenzie added the ready to merge Added to PR's which are ready to merge label Jul 10, 2024
@kbenzie kbenzie merged commit 642e343 into oneapi-src:main Jul 11, 2024
51 of 54 checks passed
martygrant pushed a commit to intel/llvm that referenced this pull request Jul 11, 2024
…4516)

oneapi-src/unified-runtime#1829

---------

Co-authored-by: Kenneth Benzie (Benie) <k.benzie@codeplay.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda CUDA adapter specific issues experimental Experimental feature additions/changes/specification hip HIP adapter specific issues images UR images level-zero L0 adapter specific issues loader Loader related feature/bug native-cpu Native CPU adapter specific issues ready to merge Added to PR's which are ready to merge specification Changes or additions to the specification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants